package com.donn.securitycontrolplatform.userinfo.controller;


import com.donn.securitycontrolplatform.common.Result;
import com.donn.securitycontrolplatform.userinfo.service.IUserinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhenglx
 * @since 2022-07-05
 */
@RestController
@RequestMapping("scp/api/userinfo")
public class UserinfoController {
    @Autowired
    IUserinfoService service;
    @RequestMapping("login")
    public Result login(String username, String password) {
        // 1.调用业务对象的方法执行登录，并获取返回值
        // 2.将以上返回值和状态码OK封装到响应结果中并返回
        return service.login(username, password);
    }

}
